package com.ruyuan.ingestion.kafka.consumer;

import com.ruyuan.ingestion.common.Persistable;
import com.ruyuan.ingestion.parser.hbase.HBaseEventParser;
import com.ruyuan.ingestion.sink.HBaseWriter;

public class EventConsumer extends BaseConsumer {

    @Override
    protected String getKafkaTopic() {
        return "events";
    }

    @Override
    protected Boolean getKafkaAutoCommit() {
        return false;
    }

    @Override
    protected String getKafkaConsumerGrp() {
        return "eventConsumer"+getKafkaTopic();
    }

    @Override
    protected Persistable[] getWrites() {
        return new Persistable[] {
                new HBaseWriter("ry_events_db:events", new HBaseEventParser())
                //new MysqlWriter("events",new MysqlEventParser())
        };
    }
}
